package com.hjt.manager.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hjt.db.mapper.GameScreenRecordMapper;
import com.hjt.db.pojo.GameScreenRecordDO;
import com.hjt.manager.GameScreenRecordManager;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class GameScreenRecordManagerImpl extends ServiceImpl<GameScreenRecordMapper, GameScreenRecordDO> implements GameScreenRecordManager {
    @Override
    public List<GameScreenRecordDO> getOldTopTen() {
        LambdaQueryWrapper<GameScreenRecordDO> wrapper = new LambdaQueryWrapper<>();
        wrapper.orderByAsc(GameScreenRecordDO::getId);
        wrapper.last("limit 10");
        return list(wrapper);
    }
}
